﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="mfTraveFoodList.aspx.cs" Inherits="msBsc.WebUi.mMall.Public.mfTraveFoodList" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>手机地接客商城</title>
    <%=getMeta()%>
    <link rel="stylesheet" type="text/css" href="/themes/mStyle1/mGlobal.css" charset="gbk" />
    <link rel="stylesheet" type="text/css" href="/themes/mStyle1/css/public/mLogin.css" charset="gbk" />
    <link href="/themes/mStyle1/css/public/mTravelIndex.css" rel="stylesheet" />
    <link rel="stylesheet" type="text/css" href="/themes/mStyle1/css/home/base.css" charset="gbk" />
    <%=getBodyBeforeJs()%>
    <script src="/??jqPlugin/js/jquery-1.8.3.min.js,js/jBase.js,js/jmPage.js,themes/Style1/jsQt.js,jqPlugin/js/laytpl.js,themes/wStyle1/js/comm/VerifyJs.js"
        type="text/javascript"></script>
    <script type="text/javascript">
        $(window).load(function () {
        });
        //        $(window).bind('resize', function () { _self._ResizeHandler(_self); })
        //        .bind('scroll', function () { _self._ResizeHandler(_self); });
    </script>
    <!--head fix rgn-->
    <style type="text/css">
         
         
    </style>
    <base target="_self" />
</head>
<body>
    <input type="hidden" id="countryId" value="DF6723BE-A25C-4F77-BB49-A1662D3E6F2A" />
    <input type="hidden" id="cityId" value="AEF39D8E-D298-4AF1-AEC5-2B00D237F5F5" />
    <input type="hidden" id="destionId" value="" />
    <input type="hidden" id="pageIndex" value="1" />
    <div class="viewport">
        <%--<%=omQtHtmlGet.GetHeaderTopHtml(false, false)%> --%>
        <div class="header">
            <ul style="">
                <li class="t_left" style="width: 25%"><a href="/mp_Index.htm">返回</a></li>
                <li class="t_center" style="width: 50%"><span>景点<em id="scenicNumber">(0)</em></span></li>
                <li class="t_right" style="width: 25%"><a href="/mp_Login.htm">登录</a></li>
            </ul>
        </div>
        <form action='#' method="post" id="J_EmailForm">
            <div class="list_nav">
                <ul class="clearfix">
                    <li>
                        <span class="nav_span">
                            <span class="city_name">中国</span>
                            <dfn class="sjia sjia_bom"></dfn>
                        </span>
                        <select id="country_select">
                        </select>
                    </li>
                    <li>
                        <span class="nav_span">
                            <span class="city_name">北京</span>
                            <dfn class="sjia sjia_bom"></dfn>
                        </span>
                        <select id="city_select">
                        </select>
                    </li>
                    <li>
                        <span class="nav_span">
                            <span class="city_name">全部</span>
                            <dfn class="sjia sjia_bom"></dfn>
                        </span>
                        <select id="destion_select">
                        </select>
                    </li>
                    <li>
                        <span class="nav_span">
                            <span class="city_name">美食</span>
                            <dfn class="sjia sjia_bom"></dfn>
                        </span>
                        <select id="travel_type">
                            <option value="景点">景点</option>
                            <option selected="selected" value="美食">美食</option>
                            <option value="购物">购物</option>
                        </select>
                    </li>
                </ul>
            </div>

            <div>
                <ul class="classicList" id="food_list">
                </ul>
                <div>
                    <div class="pager">
                        <a href="###" id="pageNextText">查询更多</a>
                    </div>
                </div>
                <%=msBsc.WebUi.Code.QtHtmlGet.GetWapMenuHtml() %>
                <xmp id="svc_list_tem_food" style="display: none;">
            {{#for(var i=0,len=d.rows.length;i < len;i++){ }}
                    <li><div class="classicC"><a href="/mp_TravelFoodInfo.htm?foodId={{d.rows[i].NICEFOOD_ID}}"><img title="{{d.rows[i].NICEFOOD_NAME}}" src="http://www.dijieke.com/UpLoad/nicefood/{{d.rows[i].NICEFOOD_DEFAULT_PIC}} 240x198img.jpg" /><div class="classicInfo" data-value="{{d.rows[i].NICEFOOD_ID}}">{{d.rows[i].NICEFOOD_NAME}}</div></a></div></li>
            {{#} }}
                    <li style="clear:both;float:none"></li>
            </xmp>

            </div>
        </form>
        <script type="text/javascript">
            (function () {
                $("#countryId").val(GetQueryStr("countryId"));
                $("#cityId").val(GetQueryStr("cityId"));
                $("#destionId").val(GetQueryStr("destionId"));
                $("#pageIndex").val(GetQueryStr("pIndex"));
                //得到参数
                var countryId = $("#countryId").val();
                var cityId = $("#cityId").val();
                var destionId = $("#destionId").val();
                $("#country_select").change(function () {
                    window.location.href = "/mp_TraveFoodList.htm?countryId=" + $(this).val() + "&cityId=&destionId=&pIndex=1";
                });
                $("#city_select").change(function () {
                    window.location.href = "/mp_TraveFoodList.htm?countryId=" + countryId + "&cityId=" + $(this).val() + "&destionId=&pIndex=1";
                });
                $("#destion_select").change(function () {
                    window.location.href = "/mp_TraveFoodList.htm?countryId=" + countryId + "&cityId=" + cityId + "&destionId=" + $(this).val() + "&pIndex=1";
                });
                $("#travel_type").change(function () {
                    if ($(this).val() == "景点") {
                        window.location.href = "/mp_TravelScenicList.htm?countryId=" + countryId + "&cityId=" + cityId + "&destionId=" + destionId + "&pIndex=1";
                    } else if ($(this).val() == "购物") {
                        window.location.href = "/mp_TraveSpecialtyList.htm?countryId=" + countryId + "&cityId=" + cityId + "&destionId=" + destionId + "&pIndex=1";
                    }
                });
                $("#pageNextText").live("click", function () {
                    nextPage();
                });
            })()

            function doInit() {
                var pIndex = $("#pageIndex").val();
                if (IsNull(pIndex) || isNaN(pIndex)) {
                    pIndex = 1;
                }
                var _jsParam = new jsonRow();
                _jsParam.AddCell("pageRows", "16");
                _jsParam.AddCell("pageNum", pIndex);
                _jsParam.AddCell("parentsId", "00000000-0000-0000-0000-000000000000");
                _jsParam.AddCell("isAll", "true");
                _jsParam.AddCell("destionId", $("#destionId").val());
                _jsParam.AddCell("cityId", $("#cityId").val());
                _jsParam.AddCell("countryId", $("#countryId").val());
                _jsParam.AddCell("ACTION", "init");
                ajaxComm(_jsParam);
            }
            doInit();

            function setCity(data, selectId, selectCity) {
                if (IsNull(data) || data.rows.length < 1) {
                    return;
                }
                $("#" + selectId).html("");
                var cityName = "";
                for (var i = 0; i < data.rows.length; i++) {
                    if (data.rows[i].COUNTRY_CITY_ID == selectCity) {
                        $("#" + selectId).append("<option selected='selected' value='" + data.rows[i].COUNTRY_CITY_ID + "'>" + data.rows[i].COUNTRY_CITY_NME + "</option>");
                        cityName = data.rows[i].COUNTRY_CITY_NME;
                    } else {
                        $("#" + selectId).append("<option value='" + data.rows[i].COUNTRY_CITY_ID + "'>" + data.rows[i].COUNTRY_CITY_NME + "</option>");
                    }
                }
                if (IsNull(cityName)) {
                    cityName = data.rows[0].COUNTRY_CITY_NME;
                }
                $("#" + selectId).siblings(".nav_span").children(".city_name").text(cityName);
            }

            function showNextPage(dataCount) {
                var pIndex = $("#pageIndex").val();
                var pageIndex = parseInt(pIndex);
                var count = parseInt(dataCount);
                if (pageIndex * 16 < count) {
                    $(".pager").show();
                } else {
                    $(".pager").hide();
                }
            }

            function nextPage() {
                var pIndex = $("#pageIndex").val();
                var pageIndex = parseInt(pIndex) + 1;
                $("#pageIndex").val(pageIndex);
                doInit();
            }
        </script>
    </div>
</body>
<%=getBodyAfterJs() %>
</html>
